package cn.schoolwow.quickdao.module.database.ddl.action.service.column;

import cn.schoolwow.quickdao.module.database.ddl.action.flow.column.renameTableColumn.CheckPropertyExistFlow;
import cn.schoolwow.quickdao.module.database.ddl.action.flow.column.renameTableColumn.RenameTableColumnFlow;
import cn.schoolwow.quickdao.module.database.ddl.common.flow.DeleteDatabaseEntityCacheFlow;
import cn.schoolwow.quickflow.QuickFlowExecutor;
import cn.schoolwow.quickflow.flow.CompositeBusinessFlow;

public class RenameTableColumnCompositeBusiness implements CompositeBusinessFlow {
    @Override
    public void executeCompositeBusiness(QuickFlowExecutor quickFlowExecutor) {
        quickFlowExecutor.next(new CheckPropertyExistFlow())
                .next(new RenameTableColumnFlow())
                .next(new DeleteDatabaseEntityCacheFlow());
    }

    @Override
    public String name() {
        return "重命名数据库指定表的指定字段名称";
    }
}
